package org.jeecg.modules.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.crm.entity.CrmCustomer;
import org.jeecg.modules.crm.entity.vo.CrmCustomerVO;

/**
 * @Description: 客户信息
 * @Author: jeecg-boot
 * @Date:   2023-06-03
 * @Version: V1.0
 */
public interface CrmCustomerMapper extends BaseMapper<CrmCustomer> {
    
    /**
     * 通过ID查询客户及其联系人和项目信息
     * @param id 客户ID
     * @return 客户VO
     */
    CrmCustomerVO getCustomerVOById(@Param("id") String id);
    
    /**
     * 分页查询客户列表
     * 
     * @param page 分页参数
     * @param customer 查询条件
     * @return 分页数据
     */
    IPage<CrmCustomer> selectCustomerPage(Page<CrmCustomer> page, @Param("customer") CrmCustomer customer);
    
} 